﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace S.Archives.Api.Migrations
{
    public partial class str_更新档案字段 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "EITag",
                table: "WanderModel");

            migrationBuilder.DropColumn(
                name: "EITag",
                table: "SheepFileModel");

            migrationBuilder.DropColumn(
                name: "MarkId",
                table: "SheepFileModel");

            migrationBuilder.RenameColumn(
                name: "ParentEITag",
                table: "SheepFileModel",
                newName: "ParentEarTag");

            migrationBuilder.RenameColumn(
                name: "MotherEITag",
                table: "SheepFileModel",
                newName: "MotherEarTag");

            migrationBuilder.RenameColumn(
                name: "EITag",
                table: "PromptModels",
                newName: "EarTag");

            migrationBuilder.AddColumn<string>(
                name: "EarTag",
                table: "WanderModel",
                type: "nvarchar(16)",
                maxLength: 16,
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "EarTag",
                table: "WanderModel");

            migrationBuilder.RenameColumn(
                name: "ParentEarTag",
                table: "SheepFileModel",
                newName: "ParentEITag");

            migrationBuilder.RenameColumn(
                name: "MotherEarTag",
                table: "SheepFileModel",
                newName: "MotherEITag");

            migrationBuilder.RenameColumn(
                name: "EarTag",
                table: "PromptModels",
                newName: "EITag");

            migrationBuilder.AddColumn<string>(
                name: "EITag",
                table: "WanderModel",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "EITag",
                table: "SheepFileModel",
                type: "nvarchar(16)",
                maxLength: 16,
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "MarkId",
                table: "SheepFileModel",
                type: "int",
                nullable: true);
        }
    }
}
